package IO;

import java.io.*;

public class BufferedReaderStream1 {
    public static void main(String[] args) throws IOException {
        try (Reader re = new FileReader("day10-file_io/src/File5.txt");
             BufferedReader br = new BufferedReader(re)) { //不用多态，默认有换行
//            char[]src=new char[1024];
//            int len;
//            while((len=br.read(src))!=-1){
//                System.out.println(new String(src,0,len));
//            }
            String line;
            while((line=br.readLine())!=null){
                System.out.println(line);
            }
        }catch (Exception e) {
            e.printStackTrace();
        }
    }
}
